<div id="content" class="account">
    <h1><?=$data->TITLE?></h1>
    <h3><?=$data->DESCRIPTION?></h3>
    <form id="form" method="post" action="/json<?=PREFIX.'/'.APP.'/'.CMD?>">
        <div class="formLineLight">
            <label class="formLabel"><?=_('E-mail')?>:  </label><span class="input required">
                <input id="email" name="email" type="text" tabindex="1" value="<?=$data->account->email?>" />
            </span>
        <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Password')?>:  </label>
            <span class="input required">
            <input id="pass" name="pass" type="password" tabindex="2" value="" /></span>
        <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Repeat password')?>:  </label>
            <span class="input required"><input id="repass" name="repass" type="password" tabindex="3" value="" /></span>
        <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Full name')?>:  </label>
            <span class="input required"><input id="name" name="name" type="text" tabindex="4" value="<?=$data->account->fullname?>" /></span>
        <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Sex')?>:  </label>
            <span class="select required">
                <select id="sex" name="sex" tabindex="5">
                    <option value="female" <?=$data->account->sex=='female'?'selected="selected"':''?>><?=_('Female')?></option>
                    <option value="male" <?=$data->account->sex=='male'?'selected="selected"':''?>><?=_('Male')?></option>
                </select>
            </span>
        <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Birth date')?>:  </label>
            <span class="date required">
                <select id="year" name="year" onchange="tool.setday('year','month','day');" tabindex="6">
                    <option><?=_('Year')?></option>
                </select>
                <select id="month" name="month" onchange="tool.setday('year','month','day');" tabindex="7">
                    <option><?=_('Month')?></option>
                </select>
                <select id="day" name="day" tabindex="8">
                    <option><?=_('Day')?></option>
                </select>
            </span>
        <span class="clear"></span>
        </div>
        <h2><span><?=_('Contact')?></span></h2>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Country')?>:  </label>
            <span class="select required">
                <select id="country" name="country" tabindex="9" onchange="tool.regions('/json/home/regions/'+this.get('value'),'region');">
                    <option value="0"><?=_('Select a country')?></option>
                </select>
            </span>
        <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Region')?>:  </label>
            <span class="select required">
                <select id="region" name="region" tabindex="10">
                     <option value="0"><?=_('Select a region')?></option>
                </select>
            </span>
        <span class="clear"></span>
        </div>
        <div class="formLineDark">
                <label class="formLabel"><?=_('Confirmation status')?>:</label>
                <span class="info">
                    <?=$data->account->access<0?_('Unconfirmed'):_('Confirmed')?>
                </span>
        <span class="clear"></span>
        </div>
        <? $data->account->access = abs($data->account->access); ?>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Access level')?>:  </label>
            <span class="select required">
                <select id="access" name="access" tabindex="12">
                    <option value="8" <?=$data->account->access==8?'selected="selected"':''?>><?=_('Developer')?></option>
                    <option value="7" <?=$data->account->access==7?'selected="selected"':''?>><?=_('Administrator')?></option>
                    <option value="6" <?=$data->account->access==6?'selected="selected"':''?>><?=_('Editor')?></option>
                    <option value="3" <?=$data->account->access==3?'selected="selected"':''?>><?=_('Member')?></option>
                    <option value="2" <?=$data->account->access==2?'selected="selected"':''?>><?=_('Nominee')?></option>
                    <option value="1" <?=$data->account->access==1?'selected="selected"':''?>><?=_('Banned')?></option>
                </select>
            </span>
        <span class="clear"></span>
        </div>
        <div class="formLinedark">
            <span class="submit">
                <span id="loader" class="loader"><img src="/themes/<?=THEME?>/images/loader.gif" alt="loader" /></span>
                <input id="ID" name="ID" type="hidden" value="<?=$data->account->ID?>" />
                <input id="submit" class="submit" type="submit" value="<?=$data->account->ID?_('Save'):_('Create Account')?>" tabindex="13" />
                <span class="clear"></span>
            </span>
        <span class="clear"></span>
        </div>
    </form>
    <div class="clear"></div>
</div>
<div id="aside">
    <?include 'apps/home/template/_home_flank.html'?>
</div>
<script type="text/javascript">
tool.countries('/json/home/countries','country','<?=$data->account->contact->country->code?>');
tool.regions('/json/home/regions/<?=$data->account->contact->country->code?>','region','<?=$data->account->contact->region->code?>');
tool.birthdate(<?=@date('Y')-18?>,<?=@date('Y')-88?>,'<?=$data->account->birthday?$data->account->birthday:'0000-00-00'?>');
tool.form();
</script>